<template>
  <div class="sigin">
      <p>积分 {{count}}</p>
      <button @click="siginftn">签到</button>
  </div>
</template>

<script>
import { ref, reactive, toRefs, getCurrentInstance } from "vue";
import { getLogs,sigin } from "../../api/secendPage/index";
export default {
  setup() {
    const { proxy } = getCurrentInstance();
    proxy.$Test();
    const count = ref(0);
    getLogs({token:localStorage.getItem('token')}).then(res => {
        count.value = res.data.result[0].scoreLeft
    })
   const siginftn = () => {
      sigin({token:localStorage.getItem('token')}).then(res => {
          console.log(res);
      })
   }
    return {
      count,
      siginftn
    }
  },
};
</script>
<style lang="scss" scoped>
.sigin{
  height: 100%;

}
</style>